Google Apps Script - source.getSheets return error 'source undefined' when it is called from script